Installation

Note: In these installation instructions, we refer to the root of your game directory structure as <mod_dir>. For example, if you have a Windows dedicated server with a default installation and you are using Counter-Strike, then <mod_dir> would be C:\HLServer\cstrike\. If you are using Linux and TFC, then <mod_dir> would be /home/hlds_l/tfc. Please verify the location of your Half-Life server before beginning this installation process. Old users note: Metamod and clanmod have changed directory, all files have been moved due to the new addon folder structure, please make note of this and read all paths carefully.

Installing Metamod

    If you already have Metamod installed on your server then you can skip this step and move on to step two. Since Metamod is also required for AdminMod, HLGuard, StatsMe, Cheating-Death and many other Half-Life mods, many servers already have it installed. 

    If you need to download Metamod you can get it at one of the following:

            * http://www.metamod.org
            * http://www.unitedadmins.com/metamod_dl.php 

    You do not need the complete Metamod package. All you need is metamod.dll for Windows servers or metamod_i386.so for Linux servers. Download this file and save it in the <mod_dir>/addons/metamod/dlls/ directory. 

    Next, you need to update your liblist.gam file so that metamod is loaded. liblist.gam exists in <mod_dir>. Follow these instructions depending on whether you are running a Windows or Linux server. 

    For Windows servers:

            * open liblist.gam with a plain text editor such as Notepad. Avoid the use of rich text editors such as Wordpad and MS-Word.
            * find the line that specifies your game dll. It looks something like this:

                  gamedll "dlls\<yourgame>.dll" 

            * change this line to this:

                  gamedll "addons/metamod/dlls/metamod.dll" 

            * save and close the file 

    For Linux servers:

            * open liblist.gam with a such as vim, or pico.
            * find the line that specifies your Linux game dll. It looks something like this:

                  gamedll_linux "dlls/<yourgame>.so" 

            * change this line to this:

                  gamedll_linux "addons/metamod/dlls/metamod_i386.so" 

            * save and close the file 

Installing ClanMod Files

    For Windows servers:

            * extract clanmod_mm.dll into the <mod_dir>/addons/clanmod/dlls/ folder.
            * extract the ClanMod config files and directories into the <mod_dir>/addons/clanmod/ folder. This folder may need to be created if you don't have a previous version of ClanMod installed.
            * open the file <mod_dir>/addons/metamod/plugins.ini in a plain text editor such as Notepad. Avoid the use of rich text editors such as Wordpad and MS-Word. This file may need to be created if it doesn't already exist.
            * Add the following line to plugins.ini: win32 addons/clanmod/dlls/clanmod_mm.dll
            * save the file and exit the text editor 

    For Linux Servers:

            * extract clanmod_mm_i586.so into the <mod_dir>addons/metamod/dlls/ directory.
            * extract the ClanMod config files and other directories into the <mod_dir>/addons/clanmod/ directory. This directory many need to be created if you don't have a previous version of ClanMod installed.
            * open the file <mod_dir>/addons/metamod/plugins.ini in a plain text editor such as vim, or pico. This file may need to be created if it doesn't already exist.
            * Add the following line to plugins.ini:

                  linux addons/clanmod/dlls/clanmod_mm_i586.so 

            * save the file and exit the text editor 

Finalizing the Install

    ClanMod is now installed and ready to run. To start ClanMod, stop and restart your hlds server. The ClanMod plugin should automatically load. You can also load and unload the plugin on every map change using the appropriate Metamod commands. (Type "meta help" in server console for more help) To ensure that the plugin is running, type "clanmod_version" in your hlds console. 

    To configure and customize ClanMod, edit the various configuration files found in <mod_dir>/addons/clanmod. The first thing you need to do is define your admins. To do this, edit the file <mod_dir>/addons/clanmod/cm_admins.cfg. There are many examples of how to do this included in the file. For complete details on how to define admins, see the ClanMod Manual section titled "Creating Admins". Once you have defined your admins, you will want to make use of ClanMod when you are in-game. For instructions on how to do this, see the sections "Logging In" and "On-Screen Menus" in both the ClanMod Manual and the ClanMod Adminstrator's Guide. 

The Config Files

    For your reference, the various files and directories in <mod_dir>/addons/clanmod/ are described below: 

            * clanmod.cfg: the root config file which executes the other config files. Note: this file is automatically exec'd by ClanMod. It must always reside in <mod_dir>/addons/clanmod/ and must not be renamed.
           
    
    Main configuration files and directories found in <mod_dir>/addons/clanmod/configs/:

            * cm_admins.cfg: the server admins and their access flags are defined here using cm_admin commands.
            * cm_aliases.cfg: command aliases are defined here using cm_alias commands.
            * cm_badwords.cfg: words not permitted to be said on the server are listed here using cm_word commands. Also, if word replacement is enabled, replacement phrases are defined here using cm_whine commands.
            * cm_consgreet.cfg: contains the welcome message displayed in the console when players connect to the server. 
            * cm_menus.cfg: the menu commands are defined here using cm_cmd commands.
            * cm_motd.cfg: contains settings and parameters for the automated Center Color Say messages.
            * cm_settings.cfg: sets up the core settings for ClanMod to function.
            * cm_titles.cfg: all of the text messages that ClanMod displays are defined here using cm_string commands.
            * cm_tksystem.cfg: contains the settings for the TeamKill System.

 	    * leagues/: all of the config files for leagues around the world, for CS, DoD, NS, TFC, and FA.
 	    * matches/: config files useful for clan matches like triple round restart, dod go live, and auto restart.
 	    * mods/: mod specific config files, some divided by locale.
 	    * warmenu/: config and settings files for high control of clan matches
 	    
    Other files and directories found in <mod_dir>/addons/clanmod/:

            * docs/: contains this installation guide, GPL license information, changelog, etc.
            * help/: contains the help text files below
            	* help/adminhelp.txt: text displayed in a MOTD window when an admin invokes the /showhelp command.
            	* help/playerhelp.txt: text displayed in a MOTD window when a player invokes the /showhelp command.
            	* help/rules.txt: text displayed in a MOTD window when anyone invokes the /showrules command.
            * logs/: contains logs generated by ClanMod including banlist.txt and snaplist.txt
            * scripts/: ClanMod addon scripts
            	* scripts/cm_scripts.cfg: this file is used to setup and execute the addon scripts.

NOTE: If you get the error message "Z_Malloc: failed on allocation of xxxx bytes" when loading a new map, you will have to either make smaller configs (remove comments - lines with "//" at the beginning) or run the server with the command line parameter -zone 4096.

NOTE: If you get an error message about SZ_GetSpace when trying to connect to your server, this is likely caused by too many Console Greetings. We recommend using the ClanMod cm_consgreet.cfg and disabling consgreet files from other addons like StatsMe, HLGuard, AMX, and AdminMod.